from typing import List


class Solution:
    def validMountainArray(self, A: List[int]) -> bool:

        left, right = 0, len(A) - 1
        if right < 2:
            return False
        left_ok = right_ok = False
        while left < right:
            if A[left] < A[left + 1]:
                left += 1
            else:
                left_ok = True

            if A[right] < A[right - 1]:
                right -= 1
            else:
                right_ok = True

            print(left, right)
            if left_ok and right_ok:
                # if left_ok and right_ok and left != right:
                print("...")
                return False

        return left != 0 and right != len(A) - 1
